﻿@namespace Blazorise
@using System.Text.RegularExpressions
@inherits BaseComponent
@foreach ( var fragment in fragments )
{
    if ( !string.IsNullOrWhiteSpace( HighlightedText ) && Regex.IsMatch( fragment, Regex.Escape( HighlightedText ), CaseSensitive ? RegexOptions.None : RegexOptions.IgnoreCase ) )
    {
        <mark @ref="@ElementRef" id="@ElementId" class="@ClassNames" style="@StyleNames" @attributes="@Attributes">@fragment</mark>
    }
    else
    {
        @fragment
    }
}